//
//  Dot.m
//  TouchPainter
//
//  Created by wjj on 15/2/12.
//  Copyright (c) 2015年 wjj. All rights reserved.
//

#import "Dot.h"

@implementation Dot

- (void)drawWithContext:(CGContextRef)context
{
    CGFloat x = self.location.x;
    CGFloat y = self.location.y;
    CGFloat frameSize = self.size;
    CGRect frame = CGRectMake(x - frameSize / 2.0, y - frameSize / 2.0, frameSize, frameSize);
    
    CGContextSetFillColorWithColor(context, self.color.CGColor);
    CGContextFillEllipseInRect(context, frame);
}

@end
